package nme.installer;


import nme.display.BitmapData;
import nme.media.Sound;
import nme.net.URLRequest;
import nme.text.Font;
import nme.utils.ByteArray;
import ApplicationMain;


/**
 * ...
 * @author Joshua Granick
 */

class Assets {

	
	public static function getBitmapData (id:String):BitmapData {
		
		switch (id) {
			
			case "assets/Dragon.png": return cast (new NME_assets_dragon_png (), BitmapData);
			case "assets/DwarfHammer.png": return cast (new NME_assets_dwarfhammer_png (), BitmapData);
			case "assets/DwarfSword.png": return cast (new NME_assets_dwarfsword_png (), BitmapData);
			case "assets/Ghost.png": return cast (new NME_assets_ghost_png (), BitmapData);
			case "assets/Goblin.png": return cast (new NME_assets_goblin_png (), BitmapData);
			case "assets/Lich.png": return cast (new NME_assets_lich_png (), BitmapData);
			case "assets/PArrow.png": return cast (new NME_assets_parrow_png (), BitmapData);
			case "assets/PDagger.png": return cast (new NME_assets_pdagger_png (), BitmapData);
			case "assets/PHammer.png": return cast (new NME_assets_phammer_png (), BitmapData);
			case "assets/PSword.png": return cast (new NME_assets_psword_png (), BitmapData);
			case "assets/Snake.png": return cast (new NME_assets_snake_png (), BitmapData);
			case "assets/TArrow.png": return cast (new NME_assets_tarrow_png (), BitmapData);
			case "assets/TFireball.png": return cast (new NME_assets_tfireball_png (), BitmapData);
			case "assets/tileWall.png": return cast (new NME_assets_tilewall_png (), BitmapData);
			case "assets/wabbit_alpha.png": return cast (new NME_assets_wabbit_alpha_png (), BitmapData);
			case "assets/WomanBow.png": return cast (new NME_assets_womanbow_png (), BitmapData);
			case "assets/WomanDagger.png": return cast (new NME_assets_womandagger_png (), BitmapData);
			case "assets/Zombie.png": return cast (new NME_assets_zombie_png (), BitmapData);
			
		}
		
		return null;
		
	}
	
	
	public static function getBytes (id:String):ByteArray {
		
		switch (id) {
			
			case "assets/Dragon.png": return cast (new NME_assets_dragon_png (), ByteArray);
			case "assets/DwarfHammer.png": return cast (new NME_assets_dwarfhammer_png (), ByteArray);
			case "assets/DwarfSword.png": return cast (new NME_assets_dwarfsword_png (), ByteArray);
			case "assets/Ghost.png": return cast (new NME_assets_ghost_png (), ByteArray);
			case "assets/Goblin.png": return cast (new NME_assets_goblin_png (), ByteArray);
			case "assets/Lich.png": return cast (new NME_assets_lich_png (), ByteArray);
			case "assets/PArrow.png": return cast (new NME_assets_parrow_png (), ByteArray);
			case "assets/PDagger.png": return cast (new NME_assets_pdagger_png (), ByteArray);
			case "assets/PHammer.png": return cast (new NME_assets_phammer_png (), ByteArray);
			case "assets/PSword.png": return cast (new NME_assets_psword_png (), ByteArray);
			case "assets/Snake.png": return cast (new NME_assets_snake_png (), ByteArray);
			case "assets/TArrow.png": return cast (new NME_assets_tarrow_png (), ByteArray);
			case "assets/TFireball.png": return cast (new NME_assets_tfireball_png (), ByteArray);
			case "assets/tileWall.png": return cast (new NME_assets_tilewall_png (), ByteArray);
			case "assets/wabbit_alpha.png": return cast (new NME_assets_wabbit_alpha_png (), ByteArray);
			case "assets/WomanBow.png": return cast (new NME_assets_womanbow_png (), ByteArray);
			case "assets/WomanDagger.png": return cast (new NME_assets_womandagger_png (), ByteArray);
			case "assets/Zombie.png": return cast (new NME_assets_zombie_png (), ByteArray);
			
		}
		
		return null;
		
	}
	
	
	public static function getFont (id:String):Font {
		
		switch (id) {
			
			
		}
		
		return null;
		
	}
	
	
	public static function getSound (id:String):Sound {
		
		switch (id) {
			
			
		}
		
		return null;
		
	}
	
	
	public static function getText (id:String):String {
		
		var bytes:ByteArray = getBytes (id);
		
		if (bytes == null) {
			
			return null;
			
		} else {
			
			return bytes.readUTFBytes (bytes.length);
			
		}
		
	}
	
	
}